package com.naiterui.ehp.bs.doctor.vo;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.naiterui.common.repository.page.PageVO;
import com.naiterui.ehp.bp.constants.DoctorStatusEnum;
import com.naiterui.ehp.bp.utils.biz.TitleUtil;
import com.naiterui.ehp.bs.doctor.utils.ImageUrlUtil;
import com.naiterui.ehp.bs.doctor.vo.patient.ConsultCommentVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;

import java.io.Serializable;
import java.util.List;

/**
 * 医生端我的页面信息
 */
@ApiModel(value = "DoctorMineVO", description = "医生我的页面信息")
public class DoctorMineVO implements Serializable{

    private static final long serialVersionUID = 6461413771937029338L;

    /** 医患关系：无关 */
    public static final Integer DOCTOR_PATIENT_RELATION_NO = -1;
    /** 医患关系：私人医生关系 */
    public static final Integer DOCTOR_PATIENT_RELATION_PERSONAL = 0;
    /** 医患关系：上级医生 */
    public static final Integer DOCTOR_PATIENT_RELATION_PARENT = 1;

    @JsonInclude(Include.NON_NULL)
    @ApiModelProperty(value = "医生ID")
    private Long doctorId;

    @ApiModelProperty(value = "医生姓名")
    @JsonInclude(Include.NON_NULL)
    private String name = "";

    @ApiModelProperty(value = "医生头像")
    @JsonInclude(Include.NON_NULL)
    private String photo = "";

    @ApiModelProperty(value = "医生所在科室")
    @JsonInclude(Include.NON_NULL)
    private Integer departmentId;

    @JsonInclude(Include.NON_NULL)
    @ApiModelProperty(value = "医生部门")
    private String department;

    @ApiModelProperty(value = "医生职称")
    @JsonInclude(Include.NON_NULL)
    private String title = "";

    @ApiModelProperty(value = "医生职称Id")
    @JsonInclude(Include.NON_NULL)
    private Integer titleId;

    @ApiModelProperty(value = "医生所在医院")
    @JsonInclude(Include.NON_NULL)
    private String hospital = "";

    @JsonInclude(Include.NON_NULL)
    private Integer hospitalId;

    @ApiModelProperty(value = "擅长")
    @JsonInclude(Include.NON_NULL)
    private String expertise = "";

    /**
     * 医生在线状态（0：否，1：是 ）
     */
    @ApiModelProperty(value = "医生在线状态（0：否，1：是 ）")
    @JsonInclude(Include.NON_NULL)
    private Integer status;

    @ApiModelProperty(value = "简介")
    @JsonInclude(Include.NON_NULL)
    private String introduction;

    @JsonInclude(Include.NON_NULL)
    private Integer praiseNum;

    @JsonInclude(Include.NON_NULL)
    private Integer fansNum;

    /**
     * 当天评论状态
     */
    @JsonInclude(Include.NON_NULL)
    private String commentResult;

    /**
     * 是否已关注
     */
    @JsonInclude(Include.NON_NULL)
    private Boolean attended;

    /**
     * 与医生关系。-1无关系；0私人医生；1关注医生
     */
    @JsonInclude(Include.NON_NULL)
    private Integer relation;

    /**
     * 线上门诊时间
     */
    @JsonInclude(Include.NON_NULL)
    private List<String> onlineTimes;
    /**
     * 线下门诊时间
     */
    @JsonInclude(Include.NON_NULL)
    private List<String> outlineTime;
    /**
     * 门诊地址
     */
    @JsonInclude(Include.NON_NULL)
    private String outlineOn;

    /**
     * 认证状态0.未认证 1.认证中 2.已认证 3.不通过
     */
    @ApiModelProperty(value = "认证状态0.未认证 1.认证中 2.已认证 3.不通过")
    @JsonInclude(Include.NON_NULL)
    private Integer authStatus;

    /**
     * <<最近扫描医生>> 使用 患者-医生：最近绑定时间
     */
    @JsonInclude(Include.NON_NULL)
    private Long bindTime;

    /**
     * 账户抵扣：<code>balanceDiscount</code>
     */
    @JsonInclude(Include.NON_NULL)
    private Integer balanceDiscount;
    /**
     * 实付：<code>realPay</code>
     */
    @JsonInclude(Include.NON_NULL)
    private Integer realPay;
    /**
     * 未支付账单数：<code>noPayNum</code>
     */
    @JsonInclude(Include.NON_NULL)
    private Integer noPayNum;
    /**
     * 账户状态0:正常，1:禁用
     */
    @JsonInclude(Include.NON_NULL)
    private Integer accountStatus;

    // 以下属性是2.5版本新增属性
    /**
     * 患者数
     */
    @ApiModelProperty(value = "患者数")
    @JsonInclude(Include.NON_NULL)
    private Integer patientNum;

    @ApiModelProperty(value = "累计服务次数（会话数）")
    private String serviceNum;
    /**
     * 好评率
     */
    @ApiModelProperty(value = "好评率")
    @JsonInclude(Include.NON_NULL)
    private String praiseRate;

    /**
     * 打赏物品信息
     */
    @JsonInclude(Include.NON_NULL)
    private List<RewardPropVO> rewardPropList;

    /**
     * 星级描述
     */
    @JsonInclude(Include.NON_NULL)
    private List<String> starsDesc;

    /**
     * 评价星级数
     */
    @JsonInclude(Include.NON_NULL)
    private Integer starLevel;

    /**
     * 评价内容
     */
    @JsonInclude(Include.NON_NULL)
    private String commentContent;

    /**
     * 评价状态
     */
    @JsonInclude(Include.NON_NULL)
    private Integer commentStatus;

    /**
     * 视频咨询费用
     */
    @JsonInclude(Include.NON_NULL)
    private Integer videoCost;

    /**
     * 视频咨询收费标准时长
     */
    @JsonInclude(Include.NON_NULL)
    private Integer videoLength;

    /**
     * 是否开通视频咨询
     */
    @JsonInclude(Include.NON_NULL)
    private Integer isOpenVideo;

    /**
     * 是否是第一次绑定的医生
     */
    @JsonInclude(Include.NON_NULL)
    private Integer isFirst;

    /**
     * 图文咨询支付状态
     */
    @JsonInclude(Include.NON_NULL)
    private Integer payStatus;

    /**
     * 图文咨询支付金额
     */
    @JsonInclude(Include.NON_NULL)
    private Integer consultCost;

    /**
     * 会话是否收费 1收费;0免费
     */
    @JsonInclude(Include.NON_NULL)
    private Integer consultPayType;

    /**
     * 是否咨询过医生 :0:未咨询过(没关注医生),1:咨询过(关注了医生),2:正在咨询中(正在会话中)
     */
    @ApiModelProperty(value = "是否咨询过医生 :0:未咨询过,1:咨询过,2:正在咨询中")
    @JsonInclude(Include.NON_NULL)
    private Integer consultActivityStatus;
    public static final int NO_CONSULT_ACTIVITY = 0;
    public static final int YES_CONSULT_ACTIVITY = 1;
    public static final int IN_CONSULT_ACTIVITY = 2;

    /**
     * 咨询活动费用
     */
    @ApiModelProperty(value = "咨询活动费用 (分)")
    @JsonInclude(Include.NON_NULL)
    private Integer consultActivityCost;

    /**
     * 咨询活动是否收费 0:免费，1:收费
     */
    @ApiModelProperty(value = "咨询活动是否收费 0:免费，1:收费 ")
    @JsonInclude(Include.NON_NULL)
    private Integer consultActivityCostType;
    /**
     * 免费
     */
    public static final int NO_CONSULT_ACTIVITY_COST = 0;
    /**
     * 收费
     */
    public static final int YES_CONSULT_ACTIVITY_COST = 1;

    @ApiModelProperty(value = "第1页评价内容")
    @JsonInclude(Include.NON_NULL)
    private PageVO<ConsultCommentVO> consultCommnetPage;

    /**
     * during
     */
    @ApiModelProperty(value = "是否有进行中会话")
    @JsonInclude(Include.NON_NULL)
    private Boolean during = false;

    @ApiModelProperty(value = "是否当前咨询医生")
    @JsonInclude(Include.NON_NULL)
    private Boolean chatting = false;

    @ApiModelProperty(value = "图文咨询价格")
    @JsonInclude(Include.NON_NULL)
    private Integer consultPrice;

    @ApiModelProperty(value = "视频咨询价格")
    @JsonInclude(Include.NON_NULL)
    private Integer videoConsultPrice;

    @ApiModelProperty(value = "视频咨询分钟数")
    @JsonInclude(Include.NON_NULL)
    private Integer videoConsultMinutes;


    public List<String> getOnlineTimes() {
        return onlineTimes;
    }

    public void setOnlineTimes(List<String> onlineTimes) {
        this.onlineTimes = onlineTimes;
    }

    public List<String> getOutlineTime() {
        return outlineTime;
    }

    public void setOutlineTime(List<String> outlineTime) {
        this.outlineTime = outlineTime;
    }

    public String getOutlineOn() {
        return outlineOn;
    }

    public void setOutlineOn(String outlineOn) {
        this.outlineOn = outlineOn;
    }

    public Integer getRelation() {
        return relation;
    }

    public void setRelation(Integer relation) {
        this.relation = relation;
    }

    public Boolean getAttended() {
        return attended;
    }

    public void setAttended(Boolean attended) {
        this.attended = attended;
    }

    public String getCommentResult() {
        return commentResult;
    }

    public void setCommentResult(String commentResult) {
        this.commentResult = commentResult;
    }

    public Integer getPraiseNum() {
        return praiseNum;
    }

    public void setPraiseNum(Integer praiseNum) {
        this.praiseNum = praiseNum;
    }

    public Integer getFansNum() {
        return fansNum;
    }

    public void setFansNum(Integer fansNum) {
        this.fansNum = fansNum;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    public Long getDoctorId() {
        return doctorId;
    }

    public void setDoctorId(Long doctorId) {
        this.doctorId = doctorId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhoto() {

            return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Integer getTitleId() {
        return titleId;
    }

    public void setTitleId(Integer titleId) {
        this.titleId = titleId;
        title = TitleUtil.getTitle(this.titleId);
    }

    public String getHospital() {
        return hospital;
    }

    public void setHospital(String hospital) {
        this.hospital = hospital;
    }

    public String getExpertise() {
        return StringUtils.isEmpty(expertise) ? "" : expertise;
    }

    public void setExpertise(String expertise) {
        this.expertise = expertise;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getHospitalId() {
        return hospitalId;
    }

    public void setHospitalId(Integer hospitalId) {
        this.hospitalId = hospitalId;
    }

    public Integer getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(Integer departmentId) {
        this.departmentId = departmentId;
    }

    public Integer getAuthStatus() {
        return authStatus;
    }

    public void setAuthStatus(Integer authStatus) {
        this.authStatus = authStatus;
    }

    public Long getBindTime() {
        return bindTime;
    }

    public void setBindTime(Long bindTime) {
        this.bindTime = bindTime;
    }

    public Integer getPayStatus() {
        return payStatus;
    }

    public void setPayStatus(Integer payStatus) {
        this.payStatus = payStatus;
    }

    /**
     * @return Integer 取得域 consultCost 的方法。
     */
    public Integer getConsultCost() {
        return consultCost;
    }

    /**
     * @param consultCost 对域 consultCost 的设置方法.
     */
    public void setConsultCost(Integer consultCost) {
        this.consultCost = consultCost;
    }

    /**
     * @return Integer 取得域 balanceDiscount 的方法。
     */
    public Integer getBalanceDiscount() {
        return balanceDiscount;
    }

    /**
     * @param balanceDiscount 对域 balanceDiscount 的设置方法.
     */
    public void setBalanceDiscount(Integer balanceDiscount) {
        this.balanceDiscount = balanceDiscount;
    }

    /**
     * @return Integer 取得域 realPay 的方法。
     */
    public Integer getRealPay() {
        return realPay;
    }

    /**
     * @param realPay 对域 realPay 的设置方法.
     */
    public void setRealPay(Integer realPay) {
        this.realPay = realPay;
    }

    /**
     * @return Integer 取得域 noPayNum 的方法。
     */
    public Integer getNoPayNum() {
        return noPayNum;
    }

    /**
     * @param noPayNum 对域 noPayNum 的设置方法.
     */
    public void setNoPayNum(Integer noPayNum) {
        this.noPayNum = noPayNum;
    }

    public Integer getAccountStatus() {
        return accountStatus;
    }

    public void setAccountStatus(Integer accountStatus) {
        this.accountStatus = accountStatus;
    }

    public Integer getPatientNum() {
        return patientNum;
    }

    public void setPatientNum(Integer patientNum) {
        this.patientNum = patientNum;
    }

    public String getPraiseRate() {
        return praiseRate;
    }

    public void setPraiseRate(String praiseRate) {
        this.praiseRate = praiseRate;
    }

    public List<RewardPropVO> getRewardPropList() {
        return rewardPropList;
    }

    public void setRewardPropList(List<RewardPropVO> rewardPropList) {
        this.rewardPropList = rewardPropList;
    }

    public List<String> getStarsDesc() {
        return starsDesc;
    }

    public void setStarsDesc(List<String> starsDesc) {
        this.starsDesc = starsDesc;
    }

    public Integer getStarLevel() {
        return starLevel;
    }

    public void setStarLevel(Integer starLevel) {
        this.starLevel = starLevel;
    }

    public String getCommentContent() {
        return commentContent;
    }

    public void setCommentContent(String commentContent) {
        this.commentContent = commentContent;
    }

    public Integer getCommentStatus() {
        return commentStatus;
    }

    public void setCommentStatus(Integer commentStatus) {
        this.commentStatus = commentStatus;
    }

    public Integer getVideoCost() {
        return videoCost;
    }

    public void setVideoCost(Integer videoCost) {
        this.videoCost = videoCost;
    }

    public Integer getVideoLength() {
        return videoLength;
    }

    public void setVideoLength(Integer videoLength) {
        this.videoLength = videoLength;
    }

    public Integer getIsOpenVideo() {
        return isOpenVideo;
    }

    public void setIsOpenVideo(Integer isOpenVideo) {
        this.isOpenVideo = isOpenVideo;
    }

    public Integer getIsFirst() {
        return isFirst;
    }

    public void setIsFirst(Integer isFirst) {
        this.isFirst = isFirst;
    }

    public Integer getConsultPayType() {
        return consultPayType;
    }

    public void setConsultPayType(Integer consultPayType) {
        this.consultPayType = consultPayType;
    }

    public Integer getConsultActivityStatus() {
        return consultActivityStatus;
    }

    public void setConsultActivityStatus(Integer consultActivityStatus) {
        this.consultActivityStatus = consultActivityStatus;
    }

    public Integer getConsultActivityCost() {
        return consultActivityCost;
    }

    public void setConsultActivityCost(Integer consultActivityCost) {
        this.consultActivityCost = consultActivityCost;
    }

    public Integer getConsultActivityCostType() {
        return consultActivityCostType;
    }

    public void setConsultActivityCostType(Integer consultActivityCostType) {
        this.consultActivityCostType = consultActivityCostType;
    }

    public PageVO<ConsultCommentVO> getConsultCommnetPage() {
        return consultCommnetPage;
    }

    public void setConsultCommnetPage(PageVO<ConsultCommentVO> consultCommnetPage) {
        this.consultCommnetPage = consultCommnetPage;
    }

    public Boolean getChatting() {
        return chatting;
    }

    public String getServiceNum() {
        return serviceNum;
    }

    public void setServiceNum(String serviceNum) {
        this.serviceNum = serviceNum;
    }

    public void setChatting(Boolean chatting) {
        this.chatting = chatting;
    }

    public Boolean getDuring() {
        return during;
    }

    public void setDuring(Boolean during) {
        this.during = during;
    }

    public Integer getConsultPrice() {
        return consultPrice;
    }

    public void setConsultPrice(Integer consultPrice) {
        this.consultPrice = consultPrice;
    }

    public Integer getVideoConsultPrice() {
        return videoConsultPrice;
    }

    public void setVideoConsultPrice(Integer videoConsultPrice) {
        this.videoConsultPrice = videoConsultPrice;
    }

    public Integer getVideoConsultMinutes() {
        return videoConsultMinutes;
    }

    public void setVideoConsultMinutes(Integer videoConsultMinutes) {
        this.videoConsultMinutes = videoConsultMinutes;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }

    //d.id as doctorId, d.name as name, d.headUrl as photo, d.titleId as titleId, d.expertise as " +
    //            "expertise, d.hospitalId as hospitalId, d.hospitalName as hospital, d.departmentId as departmentId, d.status as authStatus, d" +
    //            ".customDepartment as department


    public DoctorMineVO(Long doctorId, String name, String photo, Integer departmentId, String department, Integer titleId, String hospital,
                        Integer hospitalId, String expertise, Integer authStatus) {
        this.doctorId = doctorId;
        this.name = name;
        this.photo = photo;
        this.departmentId = departmentId;
        this.department = department;
        this.titleId = titleId;
        this.hospital = hospital;
        this.hospitalId = hospitalId;
        this.expertise = expertise;
        this.authStatus = authStatus;
    }

    public DoctorMineVO() {
    }
}
